# -*- coding:utf-8 -*-
# Author:Ami
# @Time    : 2018/11/27 21:40


class School(object):
    def __init__(self, name, addr):
        self.name = name
        self.addr = addr
        self.students = []
        self.staffs = []

    def enroll(self, stu_obj):
        print("为学员%s办理注册手续" % stu_obj.name)
        self.students.append(stu_obj)

    def hire(self, staff_obj):
        self.staffs.append(staff_obj)
        print("雇佣%s为小弟" % staff_obj.name)

class SchoolMember(object):
    def __init__(self, name, age, sex):
        self.name = name
        self.age = age
        self.sex = sex

    def tell(self):
        pass


class Teacher(SchoolMember):
    def __init__(self, name, age, sex, salary, coures):
        super(Teacher, self).__init__(name, age, sex)
        self.salary = salary
        self.coures = coures

    def tell(self):
        print('''
        ---info of Teacher:%s ----
        Name:%s
        Age:%s
        Sex:%s
        Salary:%s
        Coures:%s
        ''' % (self.name, self.name, self.age, self.sex, self.salary, self.coures))

    def teach(self):
        print("%s is teaching coures[%s]" % (self.name, self.coures))


class Student(SchoolMember):
    def __init__(self, name, age, sex, stu_id, grade):
        super(Student, self).__init__(name, age, sex)
        self.stu_id = stu_id
        self.grade = grade

    def tell(self):
        print('''
          ---info of Student:%s ----
          Name:%s
          Age:%s
          Sex:%s
          Id:%s
          Grade:%s
          ''' % (self.name, self.name, self.age, self.sex, self.stu_id, self.grade))

    def pay(self, amount):
        print("%s has paid tution for $%s" % (self.name, amount))


school = School("老男孩IT", "北京")

t1 = Teacher("Oldboy", 56, "MF", 200000, "Linux")
t2 = Teacher("Alex", 22, "M", 3000, "Python")

s1 = Student("xiaob", 36, "MF", 1001, "Python")
s2 = Student("xiaog", 26, "M", 1002, "H5")

t1.tell()

s1.tell()

school.hire(t1)

school.enroll(s1)

print(school.students)
print(school.staffs)
